package com.yao.yaoojbackendquestionservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;

// todo 如需开启 Redis，须移除 exclude 中的内容
//@SpringBootApplication(exclude = {RedisAutoConfiguration.class})
@SpringBootApplication()
@MapperScan("com.yao.yaoojbackendquestionservice.mapper")
@EnableScheduling
@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)
@ComponentScan("com.yao")  //指定扫描com.yao这个包，统一扫描
// 扫描自定义注解,就比如你要使用common里面的全局异常处理器，但是他和userservice不在同一个包，虽然他被定义为一个Bean，但是在这个项目里，他是不会被扫描的
@EnableDiscoveryClient //
@EnableFeignClients(basePackages = {"com.yao.yaoojbackendserviceclient.service"})
public class YaoojBackendQuestionServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(YaoojBackendQuestionServiceApplication.class, args);
    }
}
//37012BF27BAE1648BEB681128F4611C3
//741C4423E8FFA8FB8652AA22F6B69F5C